
THIS_SCRIPT=""
if [ -n "${BASH_SOURCE}" ]; then
    THIS_SCRIPT=${BASH_SOURCE}
fi

if [ "$0" = "${THIS_SCRIPT}" ]; then
    echo "Please run as 'source ${THIS_SCRIPT}'"
    return 1
fi

THIS_PATH=$(dirname $(realpath ${THIS_SCRIPT}))

LIB_PATH=${THIS_PATH}/lib
BIN_PATH=${THIS_PATH}/bin

PATH=${PATH}:${BIN_PATH}

if [ -z ${LD_LIBRARY_PATH} ]; then
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIB_PATH}
else
    LD_LIBRARY_PATH=${LIB_PATH}
fi

export PATH LD_LIBRARY_PATH
